import axios from "../../utils/request";

function getPeo(query) {
    return axios.get('/people', { params: query })
}

function addPeo(body) {
    return axios.post('/addPeo', body)
}

function editPeo(body) {
    return axios.put('/editPeo', body)
}

function delPeo(id) {
    return axios.delete(`/delPeo/${id}`)
}

// 筛选经纪人
function switchBroker(type){
    return axios.get('/switchBroker', { params: type })
}

export default {
    getPeo,
    addPeo,
    editPeo,
    delPeo,
    switchBroker
}